<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/14/014
 * Time: 16:27
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\api\service\Upload as UploadService;

class Upload extends BaseController {

    // 设置安全密码
    public function uploadImg() {
        file_put_contents('../runtime/upload_img.txt', date('Y-m-d H:i:s'));
        $data = UploadService::upload_image();

        file_put_contents('../runtime/upload_img.txt', " \n \n data - " . json_encode($data), FILE_APPEND);
        return $data;
    }
}